import Cookies from './xl-cookie.js'

const TokenNameKey = 'Token-Name'
const TokenKey = 'Token'
const RefreshTokenKey = 'Refresh-Token'
const UserKey = 'User'

export default {
    getTokenName() {
        return Cookies.get(TokenNameKey)
    },
    setTokenName(token) {
        return Cookies.set(TokenNameKey, token)
    },
    removeTokenName() {
        return Cookies.remove(TokenNameKey)
    },
    getToken() {
        return Cookies.get(TokenKey)
    },
    setToken(token) {
        return Cookies.set(TokenKey, token)
    },
    removeToken() {
        return Cookies.remove(TokenKey)
    },

    getRefreshToken() {
        return Cookies.get(RefreshTokenKey)
    },
    setRefreshToken(refreshToken) {
        return Cookies.set(RefreshTokenKey, refreshToken)
    },
    removeRefreshToken() {
        return Cookies.remove(RefreshTokenKey)
    },
    getUser() {
        return Cookies.get(UserKey)
    },
    setUser(user) {
        return Cookies.set(UserKey, user)
    },
    removeUser() {
        return Cookies.remove(UserKey)
    }
}
